#include "World.h"


World::World(int w, int h)
{
    SetDimensions(w, h);

    this->w = w;

    this->h = h;
}



void World::SetDimensions(int w, int h) 
{
	 //w rows

    map.resize(w);

 

    //Each row has h columns of null Tile pointers

    for(int i = 0; i < w; i++)

    {

        map.at(i).resize(h, 0);

    }

}

void World::addTile(int x, int y, Tile *tile)
{
	map[x][y] = tile;

}


Tile* World::GetTile(int x, int y)
{
	return map[x][y];

}


int World::GetHeight()  
{
	return h;
}

int World::GetWidth()
{
	return w;
}

void World::createMap(float x)
{
	sf::Texture block;
	block.loadFromFile("Assets/Block.png");
	Tile *tile;
	tile = new Tile(block);

}